home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Grab Bag
/
Shareware Grab Bag.iso
/
090
/
pctj1086.arc
/
CMDLINE.ASM
next >
Wrap
Assembly Source File
|
1986-07-07
|
1KB
|
55 lines
COMMENT " CMDLINE.ASM by Ted Mirecki, June 1986.
Program to demonstrate building of FCB's in the PSP from
command line parameters.
Must be converted to a COM file with EXE2BIN after linking.
When running, use any parameters with or without slashes, but
do not use $ in parameters.
"
CODE SEGMENT
ASSUME CS:CODE, DS:CODE
ORG 5CH ;1ST FCB IN PSP
DRIVE1 DB ? ;DRIVE ID BYTE
FILE1 DB 11 DUP(?) ;NAME AND EXTENSION
END1 DB ?
ORG 6CH ;2ND FCB
DRIVE2 DB ?
FILE2 DB 11 DUP(?)
END2 DB ?
ORG 80H ;PARAMETER AREA
PARMLEN DB ?
PARMS LABEL BYTE
ORG 100H ;BEGINNING OF CODE
CMDLINE PROC
MOV AL,'$' ;INSERT END-OF-STRING MARKER..
MOV END1,AL ; AT END OF 1ST FILENAME...
MOV END2,AL ; AND 2ND FILENAME
ADD DRIVE1,30H ;CONVERT DRIVE ID'S
ADD DRIVE2,30H
LEA DX,CRLF1 ;DISPLAY MARKER STRING
MOV AH,9
INT 21H
LEA DX,DRIVE1 ;DISPLAY 1ST DRIVE & FILENAME
MOV AH,9
INT 21H
LEA DX,CRLF2 ;DISPLAY ENDING MARKER
MOV AH,9
INT 21H
LEA DX,CRLF1 ;REPEAT FOR 2ND FILENAME
MOV AH,9
INT 21H
LEA DX,DRIVE2
MOV AH,9
INT 21H
LEA DX,CRLF2
MOV AH,9
INT 21H
INT 20H ;EXIT
CMDLINE ENDP
CRLF1 DB 0DH,0AH,'|$'
CRLF2 DB '|',0DH,0AH,'$'
CODE ENDS
END CMDLINE